package org.lanqiao.tjut.service;

import java.util.List;

import org.lanqiao.tjut.bean.UsersBean;
import org.lanqiao.tjut.bean.UsersBeanStu;
import org.lanqiao.tjut.bean.UsersBeanTea;
import org.lanqiao.tjut.dao.DaoFactory;
import org.lanqiao.tjut.db.DBDriverFactory;

public class UserInfoManagerTeaService {
	/**
	 *老师获取课程表
	 * 
	 * @return 用户信息集
	 */
	public List<UsersBeanTea> getAllUsersInfo(UsersBeanTea usersBT) {
		List<UsersBeanTea> lstUsersTea = DaoFactory.getUserInfoManagerTeaDaoInstance().getAllUsersInfo(usersBT);
		return lstUsersTea;
	}
	/**
	 * 添加修改老师课程
	 * 
	 * @param userId
	 *            用户id
	 * @return 删除结果集数目
	 */
	public int addTeaCou(UsersBeanTea usersBT) {
		int re_i = 0;
		re_i = DaoFactory.getUserInfoManagerTeaDaoInstance().addTeaCou(usersBT);
		return re_i;
	}
	/**
	 * 删除指定课程
	 * 
	 * @param userId
	 *            用户id
	 * @return 删除结果集数目
	 */
	public int deleteTeaCou(int userId) {
		int re_i = 0;
		re_i = DaoFactory.getUserInfoManagerTeaDaoInstance().deleteTeaCou(userId);
		return re_i;
	}

	
	
	/**
	 * 通过id主键获取用户信息
	 * 
	 * @param strUid
	 *            id主键
	 * @return 用户信息
	 */
	public List<UsersBeanTea> getUserInfoById(String strUid) {
		// 使用数据库查询id的信息
		List<UsersBeanTea> usersBTea = DaoFactory.getUserInfoManagerTeaDaoInstance().getUserInfoById(strUid);
		return usersBTea;
	}
	
	/**
	 * 保存用户信息
	 * 
	 * @param usersB
	 *            用户信息对象
	 * @return 保存结果的记录行数
	 */
	public int saveUserInfo(UsersBeanTea usersBT) {
		int re_i = 0;
		re_i = DaoFactory.getUserInfoManagerTeaDaoInstance().saveUserInfo(usersBT);
		return re_i;
	}

	
	/**
	 *老师获取课程表
	 * 
	 * @return 用户信息集
	 */
	public UsersBeanTea getTeaCou(UsersBeanTea usersBT) {
		UsersBeanTea lstUsersTea = DaoFactory.getUserInfoManagerTeaDaoInstance().getTeaCou(usersBT);
		return lstUsersTea;
	}
	

}
